/* ==== v-tree ==== */

.v-tree {
  background: @white;
  border: 1px solid @gray;
  cursor: default;

  &__empty-block {
    position: relative;
    min-height: 60px;
    text-align: center;
    width: 100%;
    height: 100%;
  }

  &__empty-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: @gray;
  }
}

.v-tree-node {
  white-space: nowrap;

  &__content {
    line-height: 36px;
    height: 36px;
    cursor: pointer;

    & > .v-checkbox,
    & > .v-tree-node__expand-icon {
      margin-right: 8px;
    }
    & > .el-checkbox {
      vertical-align: middle;
    }
    &:hover {
      background: @light-gray;
    }
  }

  &__expand-icon {
    display: inline-block;
    cursor: pointer;
    width: 0;
    height: 0;
    vertical-align: middle;
    margin-left: 10px;
    border: 6px solid transparent;
    border-right-width: 0;
    border-left-color: @light-silver;
    border-left-width: 7px;

    transform: rotate(0deg);
    transition: transform 0.3s ease-in-out;

    &:hover {
      border-left-color: #999;
    }

    &.expanded {
      transform: rotate(90deg);
    }

    &.is-leaf {
      border-color: transparent;
      cursor: default;
    }
  }

  &__label {
    font-size: @font-size-base;
    vertical-align: middle;
    display: inline-block;
  }

  &__loading-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
  }

  & > .v-tree-node__children {
    overflow: hidden;
    background-color: transparent;
  }

  &.is-expanded > .v-tree-node__children {
    display: block;
  }
}

.v-tree--highlight-current .v-tree-node.is-current > .v-tree-node__content {
  background-color: @color-primary;
}
